package com.hht.controller;

import com.hht.service.TestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "test")
public class TestController {
	
	private final static Logger logger = LoggerFactory.getLogger(TestController.class);

	@Autowired
    @Qualifier(value = "testServiceImpl")
    private TestService testService;

    @RequestMapping(value = "/helloworld")
    public String helloworld() {
        testService.test();
        return "helloworld";
    }
    @GetMapping("/helloworld2")
    public String helloworld2() {
    	logger.debug("测试");
        return "helloworld2";
    }
    @GetMapping("/helloworld3")
    public String helloworld3() {
    	logger.debug("测试3");
    	return "helloworld2";
    }
}
